import type { INative, AsyncDataResult, ExecuteRawSqlParams } from '../../types'
import { HttpClient } from '../../HttpClient'

export class NativeAPI implements INative {
  private httpClient: HttpClient

  constructor(httpClient: HttpClient) {
    this.httpClient = httpClient
  }

  public async raw(params: ExecuteRawSqlParams): AsyncDataResult {
    return await this.httpClient.request<ExecuteRawSqlParams>('execute_raw_sql', params)
  }
}
